
GRAPHVIZ = /usr/bin/

GRAPHVIZ_DOT = $(GRAPHVIZ)dot

TOOLS = Makefile svnlog2svnfr.xslt svnfr2dot.xslt

default: pcs

.PHONY: default subversion pcs poe-component-schedule dot clean-dot

.SUFFIXES: .svnlog .svnfr .gxl .dot .png .svg

.svnlog.svnfr:
	xsltproc -o "$(@F)" svnlog2svnfr.xslt "$<"
	chmod a-w "$(@F)"

#.svnfr.gxl:
#	xsltproc -o "$(@F)" svnfr2gxl.xslt "$<"

.svnfr.dot:
	xsltproc -o "$(@F)" svnfr2dot.xslt "$<"

.gxl.dot:
	"$(GRAPHVIZ_GXL2GV)" -d -o "$(@F)" "$<"

.dot.png:
	"$(GRAPHVIZ_DOT)" -Tpng -o "$(@F)" "$<"

.dot.svg:
	"$(GRAPHVIZ_DOT)" -Tsvg -o "$(@F)" "$<"


subversion: subversion.svnfr subversion.svg

subversion.svnlog:
	svn log --xml --verbose http://svn.apache.org/repos/asf/subversion > "$(@F)"


pcs poe-component-schedule: poe-component-schedule.svnfr poe-component-schedule.svg

poe-component-schedule.svg: $(TOOLS)

poe-component-schedule.dot: $(TOOLS)

poe-component-schedule.svnlog:
	svn log --xml --verbose http://poe-component-schedule.googlecode.com/svn > "$(@F)"

poe-component-schedule.svnfr: poe-component-schedule.svnlog
	xsltproc -o "$@" --stringparam url http://poe-component-schedule.googlecode.com/svn svnlog2svnfr.xslt "$<"

